// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT

@import 'base.scss';

.cvat-standard-workspace.ant-layout {
    height: 100%;
}

.cvat-contextImage {
    width: $grid-unit-size * 32;
    position: absolute;
    background: $border-color-3;
    top: $grid-unit-size;
    right: $grid-unit-size;
    z-index: 100;
    border-radius: $grid-unit-size;
    border: 1px solid $border-color-3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: $grid-unit-size/2;
}

.cvat-contextImage-show {
    max-width: 100%;
    max-height: 100%;
}

.cvat-contextImage-loading {
    text-align: center;
}

.cvat-objects-sidebar-filter-input {
    width: calc(100% - 35px);
}

.cvat-objects-sidebar-sider {
    top: 0;
    right: 0;
    left: auto;
    background-color: $background-color-2;
    border-left: 1px solid $border-color-1;
    border-bottom: 1px solid $border-color-1;
    border-radius: $grid-unit-size/2 0 0 $grid-unit-size/2;
    z-index: 2;
}

.cvat-objects-sidebar {
    height: 100%;
}

.cvat-rotate-canvas-controls-right > svg {
    transform: scaleX(-1);
}

.cvat-canvas-controls-sidebar {
    background-color: $background-color-2;
    border-right: 1px solid $border-color-1;

    > div {
        > i {
            border-radius: 3.3px;
            transform: scale(0.65);
            padding: $grid-unit-size/4;

            &:hover {
                background: $header-color;
                transform: scale(0.75);
            }

            &:active {
                transform: scale(0.65);
            }

            > svg {
                transform: scale(0.8);
            }
        }
    }
}

.cvat-active-canvas-control {
    background: $header-color;
    transform: scale(0.75);
}

.cvat-rotate-canvas-controls-left,
.cvat-rotate-canvas-controls-right {
    transform: scale(0.65);
    border-radius: $grid-unit-size/2;

    &:hover {
        transform: scale(0.75);
    }

    &:active {
        transform: scale(0.65);
    }
}

.cvat-rotate-canvas-controls > .ant-popover-content > .ant-popover-inner > div > .ant-popover-inner-content {
    padding: 0;
}

.cvat-draw-shape-popover,
.cvat-tools-control-popover {
    > .ant-popover-content > .ant-popover-inner > div > .ant-popover-inner-content {
        padding: 0;
    }
}

.cvat-tools-track-button,
.cvat-tools-interact-button {
    width: 100%;
    margin-top: $grid-unit-size;
}

.cvat-draw-shape-popover-points-selector {
    width: 100%;
}

.cvat-tools-control-popover-content {
    width: fit-content;
    padding: $grid-unit-size;
    border-radius: $grid-unit-size/2;
    background: $background-color-2;
}

.cvat-draw-shape-popover-content {
    padding: $grid-unit-size;
    border-radius: $grid-unit-size/2;
    background: $background-color-2;
    width: 270px;

    > div {
        margin-top: $grid-unit-size/2;
    }

    > div:nth-child(3) > div > div {
        width: 100%;
    }

    > div:last-child {
        span {
            width: 100%;
        }

        button {
            width: 100%;

            &:nth-child(1) {
                border-radius: $grid-unit-size/2 0 0 $grid-unit-size/2;
            }

            &:nth-child(2) {
                border-radius: 0 $grid-unit-size/2 $grid-unit-size/2 0;
            }
        }
    }
}

.cvat-canvas-container-overflow {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.cvat-control-side-bar-icon-size {
    font-size: $grid-unit-size * 5;
}

.cvat-canvas3d-perspective {
    height: 100%;
    width: 100%;
    position: relative;
    padding: $grid-unit-size/2;
}

.cvat-canvas3d-orthographic-views {
    height: 50%;
    position: relative;
    display: flex;
    flex-direction: row;
    width: 100%;
}

.cvat-canvas3d-perspective-arrow-directions {
    position: absolute;
    padding: $grid-unit-size;
    bottom: 0;
    right: 0;
}

.cvat-canvas3d-perspective-arrow-directions-icons-up {
    margin-left: $grid-unit-size * 5.25;
}

.cvat-canvas3d-perspective-arrow-directions-icons-bottom {
    margin: $grid-unit-size/2;
}

.cvat-canvas3d-perspective-arrow-directions-icons-color {
    color: black;
}

.cvat-canvas3d-perspective-directions {
    padding: $grid-unit-size;
    position: absolute;
    bottom: 0;
    left: 0;
}

.cvat-canvas3d-perspective-directions-icon {
    margin: $grid-unit-size/2 $grid-unit-size/4;
    width: $grid-unit-size * 4;
}

.cvat-canvas3d-orthographic-view {
    width: 100%;
    height: 100%;
    padding-top: $grid-unit-size/2;
    padding-bottom: $grid-unit-size/2;
}

.cvat-canvas3d-topview {
    padding-left: $grid-unit-size/2;
    padding-right: $grid-unit-size/2;
}

.cvat-canvas3d-sideview {
    padding-right: $grid-unit-size/2;
}

.cvat-canvas3d-frontview {
    padding-right: $grid-unit-size/2;
}

.cvat-canvas3d-fullsize {
    position: relative;
    width: 100%;
    height: 100%;
}

.cvat-canvas3d-view-slider {
    position: absolute;
    margin-left: auto;
    width: $grid-unit-size * 10;
    margin-right: auto;
    right: 0;
    top: 0;
    left: 0;
    background-color: grey;
    height: $grid-unit-size/2;
}

.cvat-canvas3d-header {
    height: $grid-unit-size * 4;
    width: 100%;
    background-color: $background-color-2;
    text-align: center;
    vertical-align: middle;
}

.cvat-resizable {
    position: relative;
}

.cvat-resizable-handle-horizontal {
    position: absolute;
    margin-left: auto;
    width: 100%;
    margin-right: auto;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: grey;
    height: $grid-unit-size/2;
    cursor: ns-resize;
}

.cvat-resizable-handle-vertical-side {
    position: absolute;
    width: $grid-unit-size/2;
    margin-right: auto;
    top: $grid-unit-size * 4.5;
    right: 0;
    bottom: 0;
    background-color: grey;
    height: 100%;
    cursor: ew-resize;
}

.cvat-resizable-handle-vertical-top {
    position: absolute;
    width: $grid-unit-size/2;
    margin-right: auto;
    top: $grid-unit-size * 4.5;
    right: 0;
    bottom: 0;
    background-color: grey;
    height: 100%;
    cursor: ew-resize;
}
